package com.example.demo.task;

import com.example.demo.order.service.IZhiMa;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * Created at 2021/3/6 6:32 下午
 *
 * @author Alex
 * description
 */
@Component
public class MakeupZhiMaCreditTask {
    @Autowired
    private IZhiMa zhiMa;

    private Logger LOGGER = LoggerFactory.getLogger(MakeupZhiMaCreditTask.class);


    /**
     * 每10分钟扫描一次，自动代扣完成以后上报芝麻履约信息
     */
    @Scheduled(cron = "0 */10 * * * ?")
    private void uploadOverdule() throws InterruptedException {
        LOGGER.info("自动代扣完成以后上报芝麻履约信息,只做补偿，正常是不需要做这个任务的");
        zhiMa.uploadPaySuccess("", "");
    }
}
